package org.tgcloud.group.repository;

import org.apache.ibatis.annotations.Param;import org.tgcloud.group.entity.MjPayroll;
import org.tgcloud.group.web.controller.dto.PayRoll.PayRollImportDTO;
import org.tgcloud.group.web.controller.dto.PayRoll.PayRollListDTO;
import org.tgcloud.group.web.controller.dto.PayRoll.PayRollMsgDTO;

import java.math.BigDecimal;import java.util.Date;
import java.util.List;

public interface MjPayrollMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MjPayroll record);

    int insertSelective(MjPayroll record);

    MjPayroll selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MjPayroll record);

    int updateByPrimaryKey(MjPayroll record);

    BigDecimal selectPayPriceByUsername(@Param("username") String username, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    BigDecimal selectPayPriceByUsername2(@Param("username") String username, @Param("yearTime") Date yearTime, @Param("monthTime") Integer monthTime);

    BigDecimal selectAllPayPriceByTime(@Param("time") Date time, @Param("userType") Short userType);

    List<PayRollListDTO> selectListByTime(@Param("time") Date time);

    List<PayRollMsgDTO> selectMonthListByTime(@Param("time") Date time, @Param("userType") Short userType,
                                              @Param("userTypeName") String userTypeName);

    MjPayroll selectMonthMsgByDate(@Param("date") Date date);

    List<PayRollImportDTO> selectMonthExportListByTime(@Param("date") Date time);

    int updateStatusByDate(@Param("date") Date date, @Param("status") Short status);
}
